package net.hn.hnms.biz.intelligence.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
//import net.hn.config.SensorStatusValue;
//import net.hn.convertor.DateTimeConverter;
//import net.hn.modules.safety.calculation.intf.PointValueRaw;

import java.math.BigDecimal;
import java.time.Instant;

/**
 * 测点值信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PointValueChartBO {

    protected BigDecimal pointValue;
    protected BigDecimal maxPointValue;
    protected BigDecimal minPointValue;
    protected String dataTime;
    protected String pointStatus;
    protected String pointStatusName;
    protected Instant startTime;
    protected Instant endTime;

//    public PointValueChartBO(PointValueRaw pointValueRaw) {
//        this.pointValue = new BigDecimal(pointValueRaw.getPointValue());
//        this.maxPointValue = null != pointValueRaw.getMaxPointValue() ? new BigDecimal(
//                pointValueRaw.getMaxPointValue()) : null;
//        this.minPointValue = null != pointValueRaw.getMinPointValue() ? new BigDecimal(
//                pointValueRaw.getMinPointValue()) : null;
//        this.dataTime = DateTimeConverter.getInstantToString().convert(pointValueRaw.getDataTime());
//        this.pointStatus = pointValueRaw.getPointStatus();
//        if(pointValueRaw.getPointStatus()!=null ){
//            if(Integer.valueOf(pointValueRaw.getPointStatus() ) < 256){
//                this.pointStatusName = SensorStatusValue.getAqjkPointStatusMap(pointValueRaw.getPointStatus());
//            } else {
//                this.pointStatusName = pointValueRaw.getPointStatus() + "(未知状态)";
//            }
//        }else{
//            this.pointStatusName=null;
//        }
////        if(pointStatus!=null){
////            this.pointStatusName = SensorStatusValue.getAqjkPointStatusMap(pointStatus);
////        }else{
////            this.pointStatusName=null;
////        }
//
//
//    }
//
//    public PointValueChartBO(BigDecimal pointValue, BigDecimal maxPointValue, BigDecimal minPointValue,
//                             String dataTime, String pointStatus, Instant startTime, Instant endTime) {
//        this.pointValue = pointValue;
//        this.maxPointValue = maxPointValue;
//        this.minPointValue = minPointValue;
//        this.dataTime = dataTime;
//        this.pointStatus = pointStatus;
////        if(pointStatus!=null){
////            this.pointStatusName = SensorStatusValue.getAqjkPointStatusMap(pointStatus);
////        }else{
////            this.pointStatusName=null;
////        }
//        if(pointStatus!=null ){
//            if((  Integer.valueOf(pointStatus ) < 256 )){
//                this.pointStatusName = SensorStatusValue.getAqjkPointStatusMap(pointStatus);
//            } else {
//                this.pointStatusName = pointStatus + "(未知状态)";
//            }
//        }else{
//            this.pointStatusName=null;
//        }
//        this.startTime=startTime;
//        this.endTime=endTime;
//
//    }
}
